#!  /usr/bin/env python

# this script used to print readme of an executable file, used in linux
# jimmy 20090421

def readme(exefile):
	cmd = './%s' % exefile
	t = os.popen(cmd).read()
	f = open(exefile+'.txt','w')
	f.write(t)
	f.close()

if __name__ == '__main__':
	import sys, os
	if len(sys.argv) == 1:
		print "usage:python readme.py exefile"
	else:
		readme(sys.argv[1])
